<div class="page-header">
	<h2>Register</h2>
</div>

<div class="row">

	<div class="col-md-6">
		<form class="form-horizontal" name ="registerform">
			<div class="form-group">
				<label for="username" class="col-sm-3 control-label">User Name:</label>
				<div class="col-sm-9">
					<input id="username" name="username" ng-model="user.username" type="text" class="form-control" placeholder="Username/Email" required/>
					  <span style="color:red" ng-show="registerform.username.$dirty && registerform.username.$invalid">
                      <span ng-show="registerform.username.$error.required">用户名是必须的。</span>
                      </span>
				</div>
			</div>
			<div class="form-group">
				<label for="password" class="col-sm-3 control-label">Password:</label>
				<div class="col-sm-9">
					<input id="password" name="password" ng-model="user.password" type="password" class="form-control" placeholder="******" required/>
					<span style="color:red" ng-show="registerform.password.$dirty && registerform.password.$invalid">
                      <span ng-show="registerform.password.$error.required">密码是必须的。</span>
                      </span>
				</div>
			</div>
			<div class="form-group">
				<label for="password" class="col-sm-3 control-label">ComfirmPassword:</label>
				<div class="col-sm-9">
					<input id="password" name="confirmpassword" ng-model="user.confirmpassword" type="password" class="form-control" placeholder="******" required/>
					<span style="color:red" ng-show="registerform.confirmpassword.$dirty && registerform.confirmpassword.$invalid">
                      <span ng-show="registerform.confirmpassword.$error.required">密码是必须的。</span>
                      </span>
				</div>
			</div>
			<div class="form-group">
				<div class="col-sm-9 col-sm-offset-3">
					<input type="submit" value="Register" class="btn btn-primary" ng-click="register()"/>
				</div>
			</div>
		</form>
	</div>
	
	<div class="col-md-6">
		<p class="alert alert-info">If you do not have a account, you can not edit newsentry. <span style="color:red">I am deeply sorry that we now can not support Chinese, please do not use Chinese to as username</span></p>
	</div>

</div>